package com.ftg.learn.day10.proxy.compnay;

/**
 * 机构
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/17 上午8:30
 */
public class Org implements IStudy{

    IStudy is;

    public Org(IStudy is){
        this.is = is;
    }


    @Override
    public void study() {
        System.out.println("开班仪式");
        System.out.println("制度");
        System.out.println("认人");

        //学生  社会人员
        is.study();

        System.out.println("打扫教室... 作业 ");
    }

    @Override
    public void buy() {

    }

    public static void main(String[] args) {
        IStudy is1 = new Org(new Student());
        is1.study();
        IStudy is2 = new Org(new Society());
        is2.study();
    }
}
